package ${classPath}.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import ${commonPackage}.dao.BaseDao;
import ${classPath}.entity.${table.className}${entitySuffix};
import ${classPath}.param.${table.className}Param;
import ${classPath}.dao.${table.className}Dao;

/**
 * ${table.remark}Dao实现类
 *
 * @author ${author}
 * @version ${currentDate} ${author}
 */
 @Repository("${table.getPropertyName()}Dao")
public class ${table.className}DaoImpl extends BaseDao<${table.className}${entitySuffix}> implements ${table.className}Dao{
    
    @Override
    public Integer insert(${table.className}${entitySuffix} entity){
    	return sqlMapClientTemplate.insert("insert${table.className}", entity);
    }
   
    @Override
    public Integer update(${table.className}${entitySuffix} entity){
    	return sqlMapClientTemplate.update("update${table.className}ById", entity);
    }

    @Override
    public ${table.className}${entitySuffix} findById(String id){
    	return sqlMapClientTemplate.queryForObject("select${table.className}ById", id);
    }

    @Override
    public List<${table.className}${entitySuffix}> queryByPage(${table.className}Param param){
    	return queryList("select${table.className}List",param);
    }

    @Override
    public Integer delete(String id){
        return sqlMapClientTemplate.delete("delete${table.className}ById", id);
    }
}